#ifndef __DATA_FRAME_H_
#define __DATA_FRAME_H_

#include "simple_dataframe.h"

enum MESSAGE_ID{
	SET_POWER_CLOSE = 0x0102,
	SET_POWER_CTL	= 0x0103,
	GET_POWER_STATE = 0x0104,
	GET_POWER_BTN_STATE = 0x0105,  
	GET_BAT_MES1 = 0x0201,
	GET_BAT_MES2 = 0x0202,
	SET_BAT_PARAM = 0x0203,
	GET_BAT_PARAM = 0x0204,
	GET_BAT_STATE = 0x0205,
	GET_CHARGE_STATE = 0x0301,
	SET_LED_FRONTLEFT = 0x0401,
	SET_LED_FRONTMID = 0x0402,
	SET_LED_FRONTRIGHT = 0x0403,
	SET_LED_BACKLEFT = 0x0404,
	SET_LED_BACKMID = 0x0405,
	SET_LED_BACKRIGHT = 0x0406,
	SET_LED_ATMOSPHERE = 0x0407,
	SET_LED_TOP = 0x0408,
	SET_FAN_SWITCH = 0x0501,
	GET_FAN_STATE = 0x0502,
	SET_GET_FIRMWARE_VERSION = 0x0601,
	SET_HEART_BEAT = 0x0701,  //yyy 2020-9-18 v3.0.4
};

class Notify{
    public:
        virtual void update(const MESSAGE_ID id, void* data) = 0;
};


class Dataframe{
    public:
        virtual bool init()=0;
        virtual void register_notify(const MESSAGE_ID id, Notify* _nf)=0;
        virtual bool data_recv(unsigned char c)=0;
        virtual bool data_parse()=0;
        virtual bool interact(const MESSAGE_ID id,const unsigned char* data,const char len)=0;
};

#endif

